package com.ktjiaoyu.server.controller;

import com.ktjiaoyu.server.domain.pojo.Admin;
import com.ktjiaoyu.server.domain.pojo.Menu;
import com.ktjiaoyu.server.security.LoginUser;
import com.ktjiaoyu.server.service.MenuService;
import com.ktjiaoyu.server.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @auth wzy
 * @date 2023/2/14 16:07
 */
@Api(tags = "处理菜单相关请求")
@RestController
@RequestMapping("/sys/cfg")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @ApiOperation(value = "通过用户id查询菜单列表")
    @GetMapping("/menu")
    public Object getMenusByAdminId(){
        List<Menu> list = menuService.getMenusByAdminId();
        return list;
    }
}
